<template>
    <dv-border-box-8>
        <div class="card">
            <div class="title">
                <img src="../assets//title.png" alt="">
                <span>{{ title }}</span>
                <span v-if="more" @click="$emit('clickMore')" class="more">更多</span>
            </div>
            <slot class="card-content"></slot>
        </div>
    </dv-border-box-8>
</template>

<script>
export default {
    name: 'EchartCard',
    props: {
        title: {
            type: String,
            default: '标题'
        },
        more: {
            type: Boolean,
            default: false
        }
    }
}
</script>

<style lang="less" scoped>
.card {
    box-shadow: 0 0 5px 2px rgb(7, 86, 155) inset;
    border-radius: 10px;
    width: 100%;
    height: 100%;
    display: flex;
    padding: 10px;
    flex-direction: column;
    position: relative;

    .title {
        height: 44px;
        position: relative;
        font-size: 20px;
        text-align: left;
        font-weight: 400;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px 0 0;

        .more {
            cursor: pointer;
        }

        img {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
        }

        span {
            margin: 0 0 0 47px;
            line-height: 44px;
            color: #FFFFFF
        }
    }

    .card-content {
        flex: 1;
    }
}

/deep/ .dv-border-svg-container use[stroke-width="1"] {
    stroke: transparent !important;
}
/deep/ .dv-border-svg-container use[stroke-width="3"] {
    stroke: #0757ebdc;
    stroke-width: 2;
}
</style>